package com.xusj.collection

/**
 * Tuple 是可以包含多种类型元素的集合，元组
 *
 * @author xushijian
 * @date 2020/5/18 10:09
 *
 */
object TupleTest {

  def main(args: Array[String]): Unit = {


    //定义元组
    var tuple = ("a", "b", "c", 1, 2, 3)

    println(tuple)

    //访问元素
    println(tuple._1)

    //定义特殊元组

    var tuple1 = ("helloworld" -> 1)

    println(tuple1)

    println(tuple1._1)
  }

}
